home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / p_man / cat3 / STRead.z / STRead
Text File  |  1998-10-30  |  4KB  |  133 lines

  1.  
  2.  
  3.  
  4. SSSSTTTTRRRReeeeaaaadddd((((3333))))                        IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                         SSSSTTTTRRRReeeeaaaadddd((((3333))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      STRead, STWrite - read/write STIFF image data
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttddddiiiioooo....hhhh>>>>
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssttttiiiiffffffff....hhhh>>>>
  14.  
  15.      iiiinnnntttt SSSSTTTTRRRReeeeaaaadddd((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,, iiiinnnntttt nnnnbbbbyyyytttteeeessss))));;;;
  16.      iiiinnnntttt SSSSTTTTWWWWrrrriiiitttteeee((((SSSSTTTTSSSSttttrrrreeeeaaaammmm ****sssstttt,,,, vvvvooooiiiidddd ****bbbbuuuuffff,,,, iiiinnnntttt nnnnbbbbyyyytttteeeessss))));;;;
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      _S_T_R_e_a_d reads the specified amount of image data from a STIFF stream. The
  20.      stream specified by _s_t must have been opened as SSSSTTTT____RRRREEEEAAAADDDD.  The number of
  21.      bytes of image data specified by _n_b_y_t_e_s is read into the caller supplied
  22.      buffer _b_u_f. _S_T_R_e_a_d is called after a call to _S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r (or
  23.      _P_S_T_R_e_a_d_I_m_a_g_e_H_e_a_d_e_r), which will have supplied in the image header
  24.      structure the amount of image data available for reading.
  25.  
  26.      _S_T_W_r_i_t_e writes the specified amount of image data to a STIFF stream. The
  27.      stream specified by _s_t must have been opened as SSSSTTTT____WWWWRRRRIIIITTTTEEEE.  The number of
  28.      bytes of image data specified by _n_b_y_t_e_s is written from the caller
  29.      supplied buffer _b_u_f. _S_T_W_r_i_t_e is called after a call to _S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r
  30.      (or _P_S_T_W_r_i_t_e_I_m_a_g_e_H_e_a_d_e_r), which will have initialized a page for the
  31.      writing of image data.
  32.  
  33. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  34.      Both _S_T_R_e_a_d and _S_T_W_r_i_t_e return the number of bytes read or written if
  35.      execution was successful.  -1 is returned and _S_T_e_r_r_n_o is set if an
  36.      execution error has occurred.
  37.  
  38.      Note that it is possible for _S_T_R_e_a_d to return a number that is smaller
  39.      than _n_b_y_t_e_s.  This happens if _S_T_R_e_a_d encounters an end of file before it
  40.      has read _n_b_y_t_e_s of data.  In this situation, the number of bytes read is
  41.      returned and _S_T_e_r_r_n_o is set to SSSSTTTTEEEEEEEEOOOOFFFF.
  42.  
  43. EEEEXXXXEEEECCCCUUUUTTTTIIIIOOOONNNN EEEERRRRRRRROOOORRRR CCCCOOOODDDDEEEESSSS
  44.      _S_T_R_e_a_d will fail under the following circumstances.
  45.  
  46.      STEREADFROMWRITE         Attempt to read from a write stream.
  47.  
  48.      STESYSCALL               System call failed.
  49.  
  50.      STEEOF                   End of stream.
  51.  
  52.      _S_T_W_r_i_t_e will fail under the following circumstances.
  53.  
  54.      STEWRITETOREAD           Attempt to write to a read only stream.
  55.  
  56.      STESYSCALL               System call failed.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. SSSSTTTTRRRReeeeaaaadddd((((3333))))                        IIIImmmmpppprrrreeeessssssssaaaarrrriiiioooo                         SSSSTTTTRRRReeeeaaaadddd((((3333))))
  71.  
  72.  
  73.  
  74. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  75.      libstiff(3).
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.